package de.mpii.web;

import java.net.URI;
import java.net.URL;

import de.mpii.util.Uio;

public class Downloader {

	public static void main(String[] args) throws Exception {
		Downloader d = new Downloader("http://bertc.com/artist_alpha.html");

		d.download();
	}

	private URL url;

	public Downloader(String urlString) throws Exception {
		URI uri = new URI(urlString);

		url = uri.toURL();
	}

	public Downloader(URL url) {
		this.url = url;
	}

	public String download() throws Exception {
		return Uio.read(url);
	}

}
